package com.yanh.seckill.service;

//import com.yanh.seckill.vo.SeckillSessionSkuRedisVo;
//import com.yanh.seckill.vo.SkuSeckillSessionRedisVo;

import com.yanh.jcommon.vo.seckill.SeckillSessionInfo;
import com.yanh.jcommon.vo.seckill.SeckillSessionWithSku;

import java.util.List;

public interface SeckillService {

    /**
     * 上架三天需要秒杀的商品
     */
    void uploadSeckillSkuLatest3Days();

    void saveSessionKeySkuValueHash(List<SeckillSessionWithSku> sessions);

    void saveSkuKeySessionValueHash(List<SeckillSessionWithSku> sessions);

    /**
     * 查询秒杀活动商品信息
     * @return
     */
    List<SeckillSessionWithSku> getSeckillSessionSkuList();

    /**
     * 根据skuId查询商品是否参加秒杀活动
     * @param skuId
     * @return
     */
    SeckillSessionInfo getSkuSeckillSessionInfo(Long skuId);

    /**
     * 当前商品进行秒杀（秒杀开始）
     * @param promotionId
     * @param skuId
     * @param key
     * @param num
     * @return
     */
    String kill(Long promotionId,Long skuId, String key, Integer num) throws InterruptedException;

}
